$(function(){
    /*动态内容显示切换*/
    $(".amain-left span").click(function(){
        var p_obj=$($(this).parent(".amain-left").siblings(".amain-right"));
        p_obj.toggle();
        if(p_obj.css("display")=="none"){
            $(this).parent(".amain-left").css("height","25px");
        }
        else{
            $(this).parent(".amain-left").css("height","133px");
        }
    });

    var  innerhtml = "";
    $(".item-curMonth").mouseenter(function(){
        innerhtml =  $(this).html();
        $(this).append("<p style='font-size:2px;' class='add-job'><span>+</span>添加任务</p>");
    });
    $(".item-curMonth").mouseleave(function(){
        $(this).html(innerhtml);
    });

    $(".notice-item").each(function(index, el) {
        var  $actiwenzi = $(this).find(".notice-word p:eq(1)");
        var  $actticon = $actiwenzi.text();
        var length = $actticon.length;

        showcon();
        function showcon(){
            if(length>55){
                var shortstr = $actticon.substring(0,55);
                $actiwenzi.text(shortstr).append('...')
            }
            else{
                $actiwenzi.text($actticon);
            }

        }
        $(this).find(".btn-activity-js").click(function(event) {
            $actiwenzi.text($actticon);
            $(this).hide();
            $(this).siblings(".btn-activity-bm-js").show();

        });

    });

});


/**
 * Created by john on 2017/5/26.
 */
